﻿Imports System
Imports System.Configuration.Provider
Imports System.Collections.Generic
Imports DotNetNuke.Entities.Portals

Public MustInherit Class SitemapProvider
	Inherits ProviderBase

	Public Overrides Sub Initialize(ByVal name As String, ByVal config As System.Collections.Specialized.NameValueCollection)

		' Verify that config isn't null
		If config Is Nothing Then
			Throw New ArgumentNullException("config")
		End If

		' Assign the provider a default name if it doesn't have one
		If String.IsNullOrEmpty(name) Then
			name = "SitemapProvider"
		End If

		' Add a default "description" attribute to config if the
		' attribute doesn't exist or is empty
		If String.IsNullOrEmpty(config("description")) Then
			config.Remove("description")
			config.Add("description", "DotNetNuke Sitemap provider")
		End If

		MyBase.Initialize(name, config)

	End Sub

	Public MustOverride Function GetUrls(ByVal portalId As Integer, ByVal ps As PortalSettings, ByVal version As String) As List(Of Sitemap.SitemapUrl)

End Class

